package studay.chain;

/**
 * @program: 设计模式
 * @description:
 * @author: Tom
 * @create: 2022-01-08 13:26
 **/
public class SecondRiskControlManager extends RiskControlManager{

    public SecondRiskControlManager(String name) {
        super(name);
    }

    @Override
    public void handlerRequest(Request request) {
        if(RequestType.valueOf(request.getRequestType()) != null && request.getMoney() >= 100 && request.getMoney()<1000){
            System.out.println("中等额度，输入支付密码+短信确认");
            System.out.println(name+":"+request.getRequestType()+", 金额"+request.getMoney()+" 处理完成");
        }else {
            if(superior != null){
                superior.handlerRequest(request);
            }
        }
    }
}
